// room script file

function room_Load()
{
	//PlaySound(3);
	
	if(!GreetBK.complete)
	{
		GreetBK.complete = true;
		dBKGreeting.Start();
	}
	else
		dBKGiveRide.Start();
}

function on_call (int reason)
{
	// put all room interactions here
	
	if (Parser.Said("home"))
	{
		player.ChangeRoom(room_HQ.RoomNum, room_HQ.playerStartX, room_HQ.playerStartY);
	}
	else
	if ((Parser.Said("book store") || Parser.Said("bookstore")) && GuardAuthor.received )
	{
		player.ChangeRoom(room_BookStore.RoomNum, room_BookStore.playerStartX, room_BookStore.playerStartY);
	}
	else
	if ((Parser.Said("van [down] [by] river") || Parser.Said("van") || Parser.Said("river")) && player.HasInventory(iCard) && ConfrontJohnRenegade.received)
	{
		player.ChangeRoom(room_VanDownByRiver.RoomNum, room_VanDownByRiver.playerStartX, room_VanDownByRiver.playerStartY);
	}
	else
	if ((Parser.Said("old factory") || Parser.Said("factory")) && player.HasInventory(iMap) && mis_ConfrontFucky.received)
	{
		player.ChangeRoom(room_OldFactory.RoomNum, room_OldFactory.playerStartX, room_OldFactory.playerStartY);
	}
	else
	if(Parser.Said("rocket"))
	{
		BK.Say("horse");
	}
	else
	{
		int x = 5;
		String BKResponseToIncorrectDestination[];
		BKResponseToIncorrectDestination = new String[x];
		BKResponseToIncorrectDestination[0] = "That is not even a place.";
		BKResponseToIncorrectDestination[1] = "Do not mock me with false requests.";
		BKResponseToIncorrectDestination[2] = "This time, request an actual destination.";
		BKResponseToIncorrectDestination[3] = "Impossible. You continue to fuel my rage.";
		BKResponseToIncorrectDestination[4] = "That destination is invalid. My contempt for you grows.";
		
		int messageIndex = Random((x-1));
		BK.Say(BKResponseToIncorrectDestination[messageIndex]);
	}
	
}
